{include file="public/header" /}
<style type="text/css">.gray-bg {
    background: #fff;
}

.wrapper {
    padding: 0px;
}</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="col-sm-12">
                <div class="ibox-content">

                    <div class="form-group" style="display: none;">
                        <label class="col-sm-2 control-label">上级类型：</label>
                        <div class="col-sm-2">
                            <select class="form-control" name="pid">
                                <option value="0">顶级位置</option>
                                {volist name="list" id="v"}
                                <option value="{$v.id}" {if (isset($data.tid) and $v.id eq $data.pid) or (input('typeid', 0) eq $v.id)}selected="selected"{/if}>{:str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;", $v['depth'])}{gt name="$v['depth']" value="0"}┠&nbsp;&nbsp;{/gt}{$v.name}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">类型名称：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="name" name="name"
                                   value="{$data.name|default=''}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">发布类型价格：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="price" name="price"
                                   value="{$data.price|default=''}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否显示：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="is_show" value="0" {if !isset($data.is_show) or $data.is_show eq 0}checked="checked" {/if} /> 否 </label>
                                <label>
                                    <input type="radio" name="is_show" value="1" {if !isset($data.is_show) or $data.is_show eq 1}checked="checked" {/if} /> 是 </label>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="order" name="order"
                                   value="{$data.order|default='0'}"/>
                        </div>
                    </div>

                </div>
            </div>
    </div>
    <input type="hidden" name="id" value="{$data.id|default=0}"/>
    </form>
</div>
</div>
{include file="public/footer" /}
<script type="text/javascript" src="__STYLE__/admin/js/area.js?ver=20200522"></script>
{load href="__STYLE__/admin/plugins/iCheck/icheck.min.js"}
{load href="__STYLE__/admin/plugins/iCheck/custom.css"}
<script type="text/javascript">
    $(document).ready(function () {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        });
    });

    $("#upload").click(function () {
        layer.open({
            type: 2,
            title: '上传图片',
            shadeClose: true,
            shade: 0.2,
            area: ['70%', '60%'],
            skin: 'shangchuantup',
            content: "{:url('common/upload', ['type' => 'avatar'])}",
            shift: -1,
            scrollbar: false,
            moveType: 1,
            moveOut: true
        });
    });
</script>
{include file="public/bottom" /}